public class Main {
    public static void main(String[] args) {
        System.out.println(12345);
       bit(12345);
    }
    public static void bit(int x){
        if(x/10 != 0) {
            bit(x/10);
        }
        System.out.print(x % 10+" ");
    }
}